

<form nz-form #validateForm="ngForm" (ngSubmit)="submitForm()" nzLayout="horizontal" autocomplete="off">
    <!-- 模态框头部 -->
    <div class="modal-header">
        <div class="modal-title">
            <i class="anticon anticon-medicine-box mr-sm"></i>
            <span *ngIf="entity.id">{{l('Edit')}}</span>
            <span *ngIf="!entity.id">{{l('Create')}}</span>
        </div>
    </div>
    <!-- 模态框内容 -->
    <fieldset>
        <!-- 提示信息 -->
        <!-- <nz-alert nzType="info" nzCloseable [nzShowIcon]="true" nzMessage="l('我想提示点什么内容给你说')"></nz-alert> -->
            <nz-form-item nz-row>
                    <nz-form-label nz-col [nzSm]="6" [nzXs]="24" nzRequired nzFor="mobile">{{l('Mobile')}}</nz-form-label>
                <nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
                            <input nz-input name="mobile" #mobile="ngModel"
                                   [(ngModel)]="entity.mobile"
                                   [placeholder]="l('Mobile')"  required >

                            <!-- 校验 -->
                            <nz-form-explain *ngIf="mobile.control.dirty&&mobile.control.errors">
                                                                <ng-container *ngIf="mobile.control.hasError('required')">{{l('CanNotNull')}}</ng-container>
                            </nz-form-explain>

                </nz-form-control>
            </nz-form-item>
            <nz-form-item nz-row>
                    <nz-form-label nz-col [nzSm]="6" [nzXs]="24" nzRequired nzFor="massageType">{{l('MassageType')}}</nz-form-label>
                <nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
                            <input nz-input name="massageType" #massageType="ngModel"
                                   [(ngModel)]="entity.massageType"
                                   [placeholder]="l('MassageType')"  required >

                            <!-- 校验 -->
                            <nz-form-explain *ngIf="massageType.control.dirty&&massageType.control.errors">
                                                                <ng-container *ngIf="massageType.control.hasError('required')">{{l('CanNotNull')}}</ng-container>
                            </nz-form-explain>

                </nz-form-control>
            </nz-form-item>
            <nz-form-item nz-row>
                    <nz-form-label nz-col [nzSm]="6" [nzXs]="24" nzRequired nzFor="checkExplain">{{l('CheckExplain')}}</nz-form-label>
                <nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
                            <input nz-input name="checkExplain" #checkExplain="ngModel"
                                   [(ngModel)]="entity.checkExplain"
                                   [placeholder]="l('CheckExplain')"  required  maxlength='64' >

                            <!-- 校验 -->
                            <nz-form-explain *ngIf="checkExplain.control.dirty&&checkExplain.control.errors">
<ng-container *ngIf="checkExplain.control.hasError('maxlength')">{{l('超过最大长度')+64}}</ng-container>                                                                <ng-container *ngIf="checkExplain.control.hasError('required')">{{l('CanNotNull')}}</ng-container>
                            </nz-form-explain>

                </nz-form-control>
            </nz-form-item>
            <nz-form-item nz-row>
                    <nz-form-label nz-col [nzSm]="6" [nzXs]="24" nzRequired nzFor="captcha">{{l('Captcha')}}</nz-form-label>
                <nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
                            <input nz-input name="captcha" #captcha="ngModel"
                                   [(ngModel)]="entity.captcha"
                                   [placeholder]="l('Captcha')"  required >

                            <!-- 校验 -->
                            <nz-form-explain *ngIf="captcha.control.dirty&&captcha.control.errors">
                                                                <ng-container *ngIf="captcha.control.hasError('required')">{{l('CanNotNull')}}</ng-container>
                            </nz-form-explain>

                </nz-form-control>
            </nz-form-item>
            <nz-form-item nz-row>
                    <nz-form-label nz-col [nzSm]="6" [nzXs]="24" nzRequired nzFor="isEnabled">{{l('IsEnabled')}}</nz-form-label>
                <nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
                            <label nz-checkbox name="isEnabled" #isEnabled="ngModel"
                                   [(ngModel)]="entity.isEnabled"  required >{{l('IsEnabled')}}</label>

                            <!-- 校验 -->
                            <nz-form-explain *ngIf="isEnabled.control.dirty&&isEnabled.control.errors">
                                                                <ng-container *ngIf="isEnabled.control.hasError('required')">{{l('CanNotNull')}}</ng-container>
                            </nz-form-explain>

                </nz-form-control>
            </nz-form-item>
            <nz-form-item nz-row>
                    <nz-form-label nz-col [nzSm]="6" [nzXs]="24" nzRequired nzFor="checkTime">{{l('CheckTime')}}</nz-form-label>
                <nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
                            <nz-time-picker name="checkTime" #checkTime="ngModel"
                                            [(ngModel)]="entity.checkTime"  required ></nz-time-picker>

                            <!-- 校验 -->
                            <nz-form-explain *ngIf="checkTime.control.dirty&&checkTime.control.errors">
                                                                <ng-container *ngIf="checkTime.control.hasError('required')">{{l('CanNotNull')}}</ng-container>
                            </nz-form-explain>

                </nz-form-control>
            </nz-form-item>

    </fieldset>
    <!-- 模态框底部 -->
    <div class="modal-footer">
        <button nz-button [nzType]="'default'" type="button" (click)="close()" [disabled]="saving">
            <i class="anticon anticon-close-circle-o"></i> {{l("Cancel")}}
        </button>
        <button nz-button [nzType]="'primary'" type="submit" [disabled]="!validateForm.form.valid|| saving" [nzLoading]="saving">
            <i class="anticon anticon-save" *ngIf="!saving"></i> {{l("Save")}}
        </button>
    </div>
</form>





